<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Alexa Auto SDK: com.amazon.aace.alexa.TemplateRuntime Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="aace-logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Alexa Auto SDK
   &#160;<span id="projectnumber">2.2.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>com</b></li><li class="navelem"><b>amazon</b></li><li class="navelem"><b>aace</b></li><li class="navelem"><b>alexa</b></li><li class="navelem"><a class="el" href="classcom_1_1amazon_1_1aace_1_1alexa_1_1_template_runtime.html">TemplateRuntime</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classcom_1_1amazon_1_1aace_1_1alexa_1_1_template_runtime-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">com.amazon.aace.alexa.TemplateRuntime Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a4c8189b23f28853714a99f3e0f1e8404"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1amazon_1_1aace_1_1alexa_1_1_template_runtime.html#a4c8189b23f28853714a99f3e0f1e8404">renderTemplate</a> (String payload)</td></tr>
<tr class="separator:a4c8189b23f28853714a99f3e0f1e8404"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a485b27cafa223d145a1808326446f13b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1amazon_1_1aace_1_1alexa_1_1_template_runtime.html#a485b27cafa223d145a1808326446f13b">renderPlayerInfo</a> (String payload)</td></tr>
<tr class="separator:a485b27cafa223d145a1808326446f13b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a298e0e13beabd319017ddd30e40dbdec"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1amazon_1_1aace_1_1alexa_1_1_template_runtime.html#a298e0e13beabd319017ddd30e40dbdec">clearTemplate</a> ()</td></tr>
<tr class="separator:a298e0e13beabd319017ddd30e40dbdec"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8a8b02e8e2dd5ead01111aeba4f8a5da"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1amazon_1_1aace_1_1alexa_1_1_template_runtime.html#a8a8b02e8e2dd5ead01111aeba4f8a5da">clearPlayerInfo</a> ()</td></tr>
<tr class="separator:a8a8b02e8e2dd5ead01111aeba4f8a5da"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p><a class="el" href="classcom_1_1amazon_1_1aace_1_1alexa_1_1_template_runtime.html">TemplateRuntime</a> should be extended to handle directives from the Engine for rendering visual metadata with display cards. Metadata is provided as structured JSON and should be parsed by the platform implementation for rendering cards that adhere to design guidelines for the platform device type. For screen-specific design guidance, see the AVS UX Design Overview: <a href="https://developer.amazon.com/docs/alexa-voice-service/ux-design-overview.html#displaycards">https://developer.amazon.com/docs/alexa-voice-service/ux-design-overview.html#displaycards</a> </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a4c8189b23f28853714a99f3e0f1e8404"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4c8189b23f28853714a99f3e0f1e8404">&#9670;&nbsp;</a></span>renderTemplate()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void com.amazon.aace.alexa.TemplateRuntime.renderTemplate </td>
          <td>(</td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>payload</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Provides visual metadata associated with a user request to Alexa. The platform implementation should parse the template metadata and render a display card for the user. For supported templates and rendering guidelines, see <a href="https://alexa.design/DevDocRenderTemplate">https://alexa.design/DevDocRenderTemplate</a></p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">payload</td><td>Renderable template metadata in structured JSON format </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a485b27cafa223d145a1808326446f13b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a485b27cafa223d145a1808326446f13b">&#9670;&nbsp;</a></span>renderPlayerInfo()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void com.amazon.aace.alexa.TemplateRuntime.renderPlayerInfo </td>
          <td>(</td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>payload</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Provides visual metadata associated with a user request to Alexa for audio playback. The platform implementation should parse the player info metadata and render a display card for the user. For rendering guidelines, see <a href="https://amzn.to/DevDocTemplatePlayerInfo">https://amzn.to/DevDocTemplatePlayerInfo</a></p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">payload</td><td>Renderable player info metadata in structured JSON format</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classcom_1_1amazon_1_1aace_1_1alexa_1_1_playback_controller.html">PlaybackController</a></dd>
<dd>
<a class="el" href="classcom_1_1amazon_1_1aace_1_1alexa_1_1_audio_player.html">AudioPlayer</a> </dd></dl>

</div>
</div>
<a id="a298e0e13beabd319017ddd30e40dbdec"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a298e0e13beabd319017ddd30e40dbdec">&#9670;&nbsp;</a></span>clearTemplate()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void com.amazon.aace.alexa.TemplateRuntime.clearTemplate </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Notifies the platform implementation to dismiss the template display card </p>

</div>
</div>
<a id="a8a8b02e8e2dd5ead01111aeba4f8a5da"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8a8b02e8e2dd5ead01111aeba4f8a5da">&#9670;&nbsp;</a></span>clearPlayerInfo()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void com.amazon.aace.alexa.TemplateRuntime.clearPlayerInfo </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Notifies the platform implementation to dismiss the player info display card </p>

</div>
</div>
</div><!-- contents -->
<html>
  <body>
    <hr style="height:1px;border-width:0;color:gray;background-color:gray">
    <p style="text-align:left;">
      Alexa Auto SDK 2.2.0 - Copyright 2017-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
      <span style="float:right;">
        Licensed under the <a HREF=http://aws.amazon.com/apache2.0/>Apache License, Version 2.0</a>
      </span>
    </p>
  </body>
</html>
